#ifndef PACKET_H
#define PACKET_H

#include <QByteArray>
#include <QDateTime>

class Packet
{
public:
    Packet(int p = 0, int i = 0, QByteArray d = QByteArray()){mProtocol = p; mId = i; mData = d; mSendTime = QDateTime::currentMSecsSinceEpoch();}
    ~Packet(){}

    int protocol(){
        return mProtocol;
    }

    int id(){
        return mId;
    }

    QByteArray data(){
        return mData;
    }

    qint64 sendTime(){
        return mSendTime;
    }

    void setProtocol(int protocol){
        mProtocol = protocol;
    }

    void setId(int id){
        mId = id;
    }

    void setData(QByteArray data){
        mData = data;
    }

    void setSendDateTime(qint64 time){
        mSendTime = time;
    }

private:
    int mProtocol;
    int mId;
    QByteArray mData;
    qint64 mSendTime;
};

#endif // PACKET_H
